//
//  UIImage+extension.swift
//  PandaEye_Weibo
//
//  Created by Xuan Zhang on 16/6/14.
//  Copyright © 2016年 Xuan Zhang. All rights reserved.
//

import UIKit
extension UIImage{
    class func  createADotImage(color:UIColor)->UIImage{
        let size = CGSizeMake(1, 1)
        
        UIGraphicsBeginImageContextWithOptions(size, true, UIScreen.mainScreen().scale)
        color.set()
        UIRectFill(CGRect(x: 0, y: 0, width: size.width, height: size.height))
        let image = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return image
    }
}
